package com.common.result.demo.api;

import com.common.result.demo.domain.UserVo;
import com.google.common.collect.Lists;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by zhanghy on 2019-09-19
 * description
 */
@RestController
@RequestMapping("/apis")
public class ApiController {
    @GetMapping("")
    public List<UserVo> getUserList() {
        List<UserVo> userVoList = Lists.newArrayListWithCapacity(2);
        userVoList.add(UserVo.builder().id(1L).name("日拱一兵").age(18).build());
        userVoList.add(UserVo.builder().id(2L).name("tan").age(19).build());
        return userVoList;
    }
}
